<?php
	require_once("classes/checkLogin.class.php");
	require_once("classes/SelectedChampion.class.php");
	checkLogin::checkUser();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<title>Selected Champion</title>
		<link href="css/menu.css" rel="stylesheet" type="text/css" />
		<link href="css/grid.css" rel="stylesheet" type="text/css" />
		<link href="css/selectedChampion.css" rel="stylesheet" type="text/css" />
		
		<script type="text/javascript" src='js/menuScripts.js'></script>
		<script type='text/javascript' src='js/profilScripts.js'></script>
	</head>
	<body>
		<!-- Menu -->
		<?php
			include 'menu.html';
		?>
		
		<!-- Header -->
		<div id="header">
			<?php
				if(isset($_GET['summoner']))
				{
					$summoner = $_GET['summoner'];
				}
				else
				{
					$summoner = $_SESSION['username'];
				}
				$bestChampions = new SelectedChampion($summoner);
				$bestChampions->parseRequest();
				$bestChampions->showChampion($_GET['championName']);
			?>
			<div id="abilities">
				<?php
					$bestChampions->showSelectedChampion($_GET['championName']);
				?>
			</div>
			<div id="notes">
				<?php
					$bestChampions->showBars($_GET['championName']);
				?>
			</div>
			<div id="addComment">
				<?php echo "<a href='addComment.php?championName=".$_GET['championName']."&summoner=".$summoner."'>Add Comment</a>"; ?>
			</div>
			<div id="summoner">
				<?php echo "<a>".$summoner."</a>"; ?>
			</div>
		</div>
		
		<!-- Commentaries -->
		<div id="commentaries">
			<?php
				$bestChampions->parseCommentaries($_GET['championName']);
				$bestChampions->showCommentaries();
			?>
		</div>
	</body>
</html>